import 'dart:async';
import 'dart:convert';
import 'dart:developer';
import 'dart:io';
import 'dart:math';
import 'dart:typed_data';
import 'package:flutterapp/data.pb.dart';


List<List<T>> splitList<T>(List<T> list, int len) {
  if (len <= 1) {
  return [list];
  }

  List<List<T>> result = [];
  int index = 1;

  while (true) {
    if (index * len < list.length) {
    List<T> temp = list.skip((index - 1) * len).take(len).toList();
    result.add(temp);
    index++;
    continue;
    }
    List<T> temp = list.skip((index - 1) * len).toList();
    result.add(temp);
    break;
  }
  return result;
}

class abc{

  late var abc1;
  abc(int v){
    abc1=v;
    Timer.periodic(const Duration(seconds: 2), check);
  }

  check(Timer t){
    print('timer = $abc1');
  }
}


void main() async{

  var c = abc(123);

  var c1 = abc(444);
  c.abc1=777;
}
